#!/user/bin/env python
# -*- coding:utf-8 -*-
#filename:controllers/getfeetComments.py

'''
Created on 2011-8-30

@author: zc
'''

from checkkey import checkkey
from getCommentsjson import tfeetCommentsjson 
import web
from controllers.utils import logger
logger = logger.logger()

class getComments():
    '''获取tfeet评论内容列表
      http://tinyfeet.us/i/getfeetComments/1?cid=0&srckey=1c9dd35200eb17b73c14314c27687b67a1703cefvdyauzbq
    '''
    def __init__( self ):
        '''       Constructor        '''

    def GET( self, type ):
        referer = web.input( cid = 0 )  #接收url参数
        tfeets = None
        tfid = int( type )
        cid = int( referer.cid )
        
        if checkkey( web.config._session, web.ctx.env ):
            tf = tfeetCommentsjson()
            tfeets = tf.tfeetCommentsjson( tfid, cid ) 
        else:
            logger.error( "验证没通过..." )
        
        return tfeets
        
